package cn.lijida.weiwei.favor.modules.guest.service.impl;

import java.util.Date;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.lijida.weiwei.favor.modules.guest.entity.FavorGuest;
import cn.lijida.weiwei.favor.modules.guest.mapper.FavorGuestMapper;
import cn.lijida.weiwei.favor.modules.guest.service.IFavorGuestService;

/**
 * <p>
 * 宾客 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-12-28
 */
@Service
public class FavorGuestServiceImpl extends ServiceImpl<FavorGuestMapper, FavorGuest> implements IFavorGuestService {

	@Override
	public void create(FavorGuest guest, Long loginId) throws Exception {
		
		guest.setCreateMember(loginId);
		guest.setCreateTime(new Date());
		boolean status = this.save(guest);
		if(!status){
			throw new Exception("创建宾客失败");
		}
	}

}
